package com.easygoods.request;

import com.bestvike.stone.spring.exception.AssertUtils;
import com.easygoods.enums.DeliveryType;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author zhq
 * @date 2019/1/3 15:44
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class OrderCommitRequest extends OrderTrailRequest {
    private String sendAddressId;
    private String receiveAddressId;
    private DeliveryType deliveryType;
    private String leaveMsg;

    @Override
    public void assertValid() {
        AssertUtils.hasText(this.receiveAddressId, "receiveAddressId");
        AssertUtils.notNull(this.deliveryType, "deliveryType");
        super.assertValid();
    }
}
